﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <HEAD>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>工作计划  <{$smarty.const.WEB_NAME}></title>
	<link rel="stylesheet" type="text/css" href="./skin/default/style.css" />
	<script type="text/javascript" src="./skin/default/comm.js"></script> 
	<style type="text/css">
		  body	{font-size:13px;}
	</style>
 </HEAD>

 <BODY>
	  <table width="100%" border="1" cellspacing="0" bordercolor="#cfcfcd" cellpadding="0" class="tableList tip_workManage" style="font-size:13px;">
		  <tr> 
			<th align="center">编辑工作任务</th>
		  </tr>
	  </table>
	  <form method="post" name="from1" action="?q=workManage/editWorkTask" onsubmit="return CheckWorkTask()">
	  <input type="hidden" name="taskId" id="taskId" value="<{$taskId}>"/>
	  <input type="hidden" name="planItemId" id="planItemId" value="<{$planItemId}>"/>
	  <table width="1000px" border="1" cellspacing="0" bordercolor="#cfcfcd" cellpadding="0" class="maxLeft" style="font-size:13px;">
		<tr>
			<th width="120">任务概要</th>
			<td> <textarea name="taskName" id="taskName" class="workTaskText" style="height:60px"><{$taskName}></textarea></td>
		</tr>
		<tr>
			<th width="120">工作内容</th>
			<td> <textarea name="workContent" id="workContent" class="workTaskText" style="height:150px"><{$workContent}></textarea></td>
		</tr>
		<tr>
			<th width="120">工作过程</th>
			<td><textarea name="workDetail" id="workDetail" class="workTaskText" style="height:200px"><{$workDetail}></textarea></td>
		</tr>
		<tr>
			<th width="120">工作结果</th>
			<td><textarea name="workResult" id="workResult" class="workTaskText"><{$workResult}></textarea></td>
		</tr>
		<tr>
			<th width="120">下一步计划</th>
			<td><textarea name="nextPlan" id="nextPlan" class="workTaskText"><{$nextPlan}></textarea></td>
		</tr>
		<tr>
		  <td align="center" colspan="2">    
		  <{if $userId == $smarty.session.id}>
			<input type="submit" class="submit" value="提交" />
		  <{/if}>
		  <input type="button" class="submit" value="返回" onclick="location.href='?q=workManage/viewWorkTask&planItemId=<{$planItemId}>'" />
		  </td>
		</tr>
	  </table>
	  </form>
	</table>

	<script type="text/javascript">
	<!--
		//验证工作报告
		function CheckWorkTask() {
			 var c = $('taskName').value;
			 if( c.Trim() == "" ) {
				window.alert("任务概要不能为空");
				$('taskName').select();
				return false;
			 }

			 var a = $('workContent').value;
			 if(a.Trim() == "") {
				window.alert("工作内容不能为空");
				$('workContent').select();
				return false;
			 }

			 if( c.Trim() == a.Trim() ) {
				window.alert("你太懒了，任务概要与工作内容不能相同！");
				return false;
			 }

			 var b = $('workResult').value;
			 if(a.Trim() == b.Trim()) {
				window.alert("你太懒了，工作内容与工作结果不能相同！");
				return false;
			 }

			 return true;
		}
	 //-->
	 </script>
 </BODY>
</HTML>
